home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000100_icon-group-sender_Tue Oct 24 16:45:38 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9ONjNY23055
for icon-group-addresses; Tue, 24 Oct 2000 16:45:23 -0700 (MST)
Message-Id: <200010242345.e9ONjNY23055@baskerville.CS.Arizona.EDU>
Date: Tue, 24 Oct 2000 13:39:57 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: Parvinder Kaur <kaurp@cs.ucdavis.edu>
CC: icon-group@cs.arizona.edu
Subject: Re: counting lines
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 920
Parvinder Kaur wrote:
>
> Hi,
> I have another problem that I could use help figuring out. I'm
> suppose to count the number of lines in a text. The lines should be
> stored in a table as the key and it's associated value is the number of
> times it occurred within the text. i.e.
> Hi there
> How are you
> Hi there
> will look like this
> Hi there 2
> How are you 1
> Any help or suggestions will be greatly appreciated.
> Thanks,
> Cos :)
Since this is beginning to look like homework assignments, I'm not
going to give code here.
Instead - read about Icon tables in the Icon book or in the on-line
tutorial - this is a problem that can solved in surprisingly few
lines of Icon code. (Hint: The Icon tables, by there very nature,
provide almost everything you need, once you figure out what the
default value should be.)
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu